package com.fifth.order.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @作者：刘壬杉
 * @创建时间 2022/9/1 10:43
 **/
@FeignClient(value = "mrcai-commodity")
public interface GoodsFeign {
    /**
     * 远程调用商品描述
     * @param id
     * @return
     */
    @GetMapping("api/goods/goodsbyid/{id}")
    public String goodsById(@PathVariable String id);

    /**
     * 远程调用商品名称
     * @param id
     * @return
     */
    @GetMapping("api/goods/goodsbyidname/{id}")
    public String goodsByIdName(@PathVariable String id);

    /**
     * 检查商品上下架状态
     * @param goodsid
     * @return
     */
    @GetMapping("api/goods/checkGoodsStatus/{goodsid}")
    Integer checkGoodsStatus(@PathVariable String goodsid);
}
